package db

const TableNameRoleProduction = TablePrefix + "role_production"

type RoleProduction struct {
	BaseModel
	ProductionID uint  `gorm:"column:production_id;type:int(11);default:0;comment:槽id" json:"productionID" form:"productionID"` //槽id
	UID          uint  `gorm:"column:uid;type:int(11);default:0;comment:用户id" json:"uid" form:"uid"`                            //用户id
	CardWID      uint  `gorm:"column:card_wid;type:int(11);default:0;comment:卡牌id" json:"cardWID" form:"cardWID"`               //卡牌id
	TotalOutput  int64 `gorm:"column:total_output;type:bigint(20);default:0;comment:总产出" json:"totalOutput" form:"totalOutput"` //总产出
	SyOutput     int64 `gorm:"column:sy_output;type:bigint(20);default:0;comment:剩余产出" json:"syOutput" form:"syOutput"`         //剩余产出
	EquipOneWID  uint  `gorm:"column:equip_one_wid;type:int(11);default:0;comment:装备槽1" json:"equipOneWID" form:"equipOneWID"`  //装备槽1
	EquipTwoWID  uint  `gorm:"column:equip_two_wid;type:int(11);default:0;comment:装备槽2" json:"equipTwoWID" form:"equipTwoWID"`  //装备槽2
	Status       bool  `gorm:"column:status;type:tinyint(1);default:0;comment:是否营业" json:"status" form:"status"`                //是否营业
	Output       int64 `gorm:"column:output;type:bigint(20);default:0;comment:本次产出" json:"output" form:"output"`                //本次产出
	StarTime     int64 `gorm:"column:star_time;type:int(11);default:0;comment:开始时间" json:"starTime" form:"starTime"`            //开始时间
	EndTime      int64 `gorm:"column:end_time;type:int(11);default:0;comment:结束时间" json:"endTime" form:"endTime"`               //结束时间
	Receive      int64 `gorm:"column:receive;type:bigint(20);default:0;comment:待领取" json:"receive" form:"receive"`              //待领取
}

func (*RoleProduction) TableName() string {
	return TableNameRoleProduction
}

type RoleProductionHaxOneWarehouse struct {
	RoleProduction
	//Card WarehouseCardHasOneType `gorm:"foreignKey:ID;references:CardWID" json:"card"`
	//EquipOne WarehouseEquipHasOneType `gorm:"foreignKey:ID;references:EquipWIDOne" json:"equipOne"`
	//EquipTwo WarehouseEquipHasOneType `gorm:"foreignKey:ID;references:EquipWIDTwo" json:"equipTwo"`
}
